// Line:275
// 手动添加失效后 wskey自动更新
if (text.includes('cookie已失效') || text.includes('cookie已过期') || text.includes('cookie过期')) {
    const exec = require('child_process').execSync;
    const output = exec('task sign_wskey_wskey.py');
    if (!output.includes("wskey转换成功")){return;}
    var temp_list = output.toString().split('\n').filter((item, index) => {
        return item.length > 0;
    });
    var sendList = [];
    temp_list.forEach((item, index, thisArr) => {
        if (item.includes('wskey转换成功')){
            sendList.push(thisArr[index-3]);
            sendList.push(thisArr[index-2]);
            sendList.push(thisArr[index-1]);
            sendList.push(thisArr[index]);
            sendList.push(thisArr[index+1]);
            sendList.push(thisArr[index+2]);
        }
    });

    desp += '\n\n自动更新cookie\n\n' + sendList.join('\n');
}


// Line:410
// 检测黑名单屏蔽通知PLUS
var skipPlus = false;
if (process.env.NOTIFY_SKIP_LIST_PLUS){
    let skipList = process.env.NOTIFY_SKIP_LIST_PLUS.split('&');
    skipList.forEach((item) => {
        if (item.indexOf(':') >= 1){
            let skipTitle = item.split(':')[0];
            let skipContentList = item.split(':')[1].split('|');
            if (text.includes(skipTitle)){
                skipContentList.forEach((itemContent) => {
                    try{
                        if (desp.includes(itemContent.split('+')[0]) && desp.includes(itemContent.split('+')[1])){
                            skipPlus = true;
                            return;
                        }
                    }catch{
                        console.log('屏蔽通知黑名单PLUS配置出错');
                        desp += '\n\n屏蔽通知黑名单PLUS配置出错\n请按照格式"标题关键字1:内容1关键字1+内容1关键字2|内容2关键字1+内容2关键字2"\n'
                    }

                })
            }
        }
        if (skipPlus){return;}
    })
}
if (skipPlus){return;}